<template>
  <div class="g-bd" id="m-disc-pl-c">
    <div class="g-wrap p-pl f-pr">
      <div class="u-title f-cb">
        <h3>
          <span class="f-ff2 d-flag">搜索结果</span>

        </h3>
      </div>

      <div class="search-demo">
        <el-autocomplete
          v-model="searchQuery"
          :fetch-suggestions="querySearchAsync"
          :trigger-on-focus="false"
          placeholder="请输入内容"
          @select="handleSelectForSearch">
          <el-button slot="append" icon="el-icon-search" @click="search(1)"></el-button>

          <template slot-scope="{ item }">
            <div class="search-name"><span class="search-type">{{ item.searchType }}</span> {{ item.name }} </div>

          </template>

        </el-autocomplete>

      </div>

      <div style="">
        <el-menu default-active="歌单" class="el-menu-demo" mode="horizontal" @select="handleSelect">
          <el-menu-item index="单曲">单曲</el-menu-item>
          <el-menu-item index="歌单">歌单</el-menu-item>
          <el-menu-item index="专辑">专辑</el-menu-item>
          <el-menu-item index="歌手">歌手</el-menu-item>
        </el-menu>
      </div>
    </div>

    <!--<div>-->
      <!--<song-sheet-list-for-search></song-sheet-list-for-search>-->
    <!--</div>-->
    <!--歌单-->
    <div v-if="searchType === '歌单'">
      <ul class="m-cvrlst f-cb">
        <li v-for="(i, index) in list">
          <div class="u-cover u-cover-1">
            <img class="j-flag"
                 :src="changeUrlToResizeImg(i.coverImgUrl, 140)">
            <router-link :to="{path:'playlistDetail',query:{id:i.id}}" :title="i.name" class="msk">
            </router-link>
            <div class="bottom">
              <!--<a class="icon-play f-fr" title="播放" href="javascript:;" data-res-type="13" data-res-id="i.id"-->
                 <!--data-res-action="play"></a>-->
              <span class="icon-headset"></span>
              <span class="nb">{{i.playCount}}</span>
            </div>
          </div>
          <p class="dec">
            <router-link :to="{path:'playlistDetail',query:{id:i.id}}" :title="i.name" class="tit f-thide s-fc0">
              {{i.name}}
            </router-link>
          </p>
          <!--<p><span class="s-fc4">by</span>-->
            <!--<router-link :to="{path:'userHome',query:{id:i.userVO.id}}" :title="i.userVO.nickname" class="nm nm-icn f-thide s-fc3">-->
              <!--{{i.userVO.nickname}}-->
            <!--</router-link>-->
            <!--<sup class="u-icn u-icn-84 "></sup>-->
          <!--</p>-->
        </li>
      </ul>
      <pagination :page-num="pageNum" :pages="pages" :get-data-with-page-num="search"></pagination>
    </div>

    <!--专辑-->
    <div v-if="searchType === '专辑'">
      <ul class="m-cvrlst f-cb">
        <li v-for="(i, index) in list">
          <div class="u-cover u-cover-1">
            <img class="j-flag"
                 :src="changeUrlToResizeImg(i.picUrl, 140)">
            <router-link :to="{path:'albumDetail',query:{id:i.id}}" :title="i.name" class="msk">
            </router-link>
            <div class="bottom">
              <a class="icon-play f-fr" title="播放" href="javascript:;" data-res-type="13" data-res-id="i.id"
                 data-res-action="play"></a>
              <span class="icon-headset"></span>
              <!--<span class="nb">{{i.playCount}}</span>-->
            </div>
          </div>
          <p class="dec">
            <router-link :to="{path:'albumDetail',query:{id:i.id}}" :title="i.name" class="tit f-thide s-fc0">
              {{i.name}}
            </router-link>
          </p>
          <p class="time">
            {{ new Date(i.publishTime).toLocaleString()}}
          </p>
          <!--<p><span class="s-fc4">by</span>-->
          <!--<router-link :to="{path:'playlistUser',query:{id:i.userId}}" :title="i.userVO.nickname" class="nm nm-icn f-thide s-fc3">-->
          <!--{{i.userVO.nickname}}-->
          <!--</router-link>-->
          <!--<sup class="u-icn u-icn-84 "></sup>-->
          <!--</p>-->
        </li>
      </ul>
      <pagination :page-num="pageNum" :pages="pages" :get-data-with-page-num="search"></pagination>
    </div>

    <!--歌手-->
    <div class="m-sgerlist" v-if="searchType === '歌手'">
      <ul class="m-cvrlst f-cb" >
        <li v-for="(item,index) in list">
          <div class="u-cover u-cover-1">
            <img class="j-flag" :src="changeUrlToResizeImg(item.picUrl, 130)">
            <router-link :to="{path:'artistDetail',query:{id:item.id}}" :title="item.name + '的音乐'" class="msk">
            </router-link>
            <!--<a :title="item.name + '的音乐'" href=" /artist?id=6452" class="msk"></a>-->
          </div>
          <p class="dec">
            <!--<a href="/artist?id=6452" class="nm nm-icn f-thide s-fc0" :title="item.name + '的音乐'">{{item.name}}</a>-->
            <router-link :to="{path:'artistDetail',query:{id:item.id}}" :title="item.name + '的音乐'" class="nm nm-icn f-thide s-fc0">
              {{item.name}}
            </router-link>
            <!--<a v-if="item.accountId" class="icn u-icn u-icn-5" href="/user/home?id=97137413" :title="item.name +'的个人主页'"></a>-->
          </p>
        </li>
      </ul>
      <pagination :page-num="pageNum" :pages="pages" :get-data-with-page-num="search"></pagination>
    </div>

    <!--单曲-->
    <div id="song-list-pre-cache" data-simple="0" v-if="searchType === '单曲'" class="song-result">
      <div oncopy="return false;" oncut="return false;" ondragstart="return false;"
           id="auto-id-xgcPso3r7UDTlBNf">
        <div class="j-flag" id="auto-id-rfTGwS5VKLMzSyCF">
          <table class="m-table ">
            <thead>
            <tr>
              <th class="first w1">
                <div class="wp">&nbsp;</div>
              </th>
              <th>
                <div class="wp">歌曲标题</div>
              </th>
              <th class="w2">
                <div class="wp">时长</div>
              </th>
              <th class="w3">
                <div class="wp">歌手</div>
              </th>
              <th class="w4">
                <div class="wp">专辑</div>
              </th>
            </tr>
            </thead>
            <tbody>
            <tr id="1931211497259431552" class="even " v-for="(item,index) in list">
              <td class="left">
                <div class="hd ">
                  <span class="ply" @click="play(item)">&nbsp;</span>
                  <span class="num">{{index+1}}</span></div>
              </td>
              <td class="">
                <div class="f-cb">
                  <div class="tt">
                    <div class="ttc"><span class="txt">
                              <router-link :to="{path:'songDetail',query:{id:item.id}}">
                                <b :title="item.name">{{item.name}}</b>
                              </router-link>
                              </span>
                    </div>
                  </div>
                </div>
              </td>
              <td class=" s-fc3">
                <span class="u-dur " v-if="!showText[index]">{{item.duration|MillisecondToDate}}</span>
              </td>
              <td class="">

                <div class="text" v-if="item.songArtists !== null">
                          <span>
                           <router-link :to="{path:'artistDetail',query:{id:a.id}}" hidefocus="true" v-for="(a,index) in item.songArtists" :key="a.id">{{a.name}}
                             <a v-if="index!==item.songArtists.length-1">
                               /
                             </a>
                           </router-link>
                          </span>
                </div>
              </td>
              <td class="">
                <div class="text" v-if="item.songAlbum !== null">
                  <router-link :to="{path:'albumDetail',query:{id:item.songAlbum.id}}" :title="item.songAlbum.name">{{item.songAlbum.name}}</router-link>
                </div>
              </td>
            </tr>
            </tbody>
          </table>
        </div>
        <div class="j-flag"></div>
        <pagination :page-num="pageNum" :pages="pages" :get-data-with-page-num="search"></pagination>
      </div>
    </div>
  </div>
</template>

<script>

  import {apiContext, searchAll, searchSongs, searchArtists, searchAlbums, searchPlaylists, playlist, getPlaylistsByTagId} from  './../service/getData';
  import SongSheetListForSearch from '../components/songSheetListForSearch'
  import PaginationWithTag from '../components/paginationWithTag'
  import Pagination from '../components/pagination'
  export default {
    name: 'searchResult',
    components: {Pagination, PaginationWithTag, SongSheetListForSearch},
    data () {
      return {
        searchQuery: this.$route.query.searchQuery,
        choseItem: 1,
        pageNum: 1,
        pages: 1,
        list: [],
        searchSuggests: [
          {searchType: "单曲", name: "蜡笔小新"},
          {searchType: "单曲", name: "蜡笔小新"},
          {searchType: "单曲", name: "蜡笔小新"},
          {searchType: "单曲", name: "蜡笔小新"},
        ],
        searchType: "歌单"
      }
    },
    methods: {
      play(item){
        this.$http.post(apiContext+"playlist/addPlayCount", {
          playlistId: this.list.id,
        }, {
          emulateJSON : true,
          headers: {
            'Content-Type': 'x-www-form-urlencoded',
          }}).then(res => {
          console.log(res);
          let status = res.body.status;
          if (status === 200) {
            this.list.playCount = res.body.data;
          } else {
            console.log(res.body.msg)
          }
        })
        this.$store.commit('addQueue',item);
        this.$store.dispatch('getMusicUrl')
      },
      allin(){
        this.$http.post(apiContext+"playlist/addPlayCount", {
          playlistId: this.list.id,
        }, {
          emulateJSON : true,
          headers: {
            'Content-Type': 'x-www-form-urlencoded',
          }}).then(res => {
          console.log(res);
          let status = res.body.status;
          if (status === 200) {
            this.list.playCount = res.body.data;
          } else {
            console.log(res.body.msg)
          }
        })
        this.$store.commit('addAll',this.list.songs);
        this.$store.dispatch('getMusicUrl')
      },
      getSearchFunction() {
        if (this.searchType === '单曲') {
          return searchSongs
        } else if (this.searchType === '专辑') {
          return searchAlbums
        } else if (this.searchType === '歌手') {
          return searchArtists
        } else if (this.searchType === '歌单') {
          return searchPlaylists
        }
      },
      search(pageNum) {
        if (this.searchQuery.length === 0) {
          return
        }
        this.list = []
        let searchFunction = this.getSearchFunction();
        searchFunction(this).get({
          pageNum: pageNum,
          pageSize: 10,
          query: this.searchQuery
        }).then(res => {
          console.log(res)
          if (res.body.status === 200) {
            let data = res.body.data;
            this.list = data.rows;
            this.pageNum = pageNum;
            this.pages = data.pages;

            if (this.searchType === '单曲' &&  this.list !== null) {
              this.list.forEach(function (value, key) {
                value.singer = "";
                if (value.songArtists !== null) {
                  value.songArtists.forEach(function (val, k) {
                    value.singer += val.name + '/'
                  });
                  value.singer = value.singer.substr(0, value.singer.length-1);
                }
              });
              this.showText = [];
              for (let i = 0; i < this.list.length; i++) {
                this.showText.push(false);
              }
            }
          } else {
            this.$message({
              message: res.body.msg,
              type: 'error'
            });
          }

        })
      },

      querySearchAsync(queryString, cb) {

        searchAll(this).get({
          pageNum: 0,
          pageSize: 3,
          query: queryString
        }).then(res => {
          console.log(res)
          let data = res.body.data;
          let albums = data.albumPage.content;
          albums.forEach(function (item) {
            item['searchType'] = "专辑"
          })
          let artists = data.artistPage.content;
          artists.forEach(function (item) {
            item['searchType'] = "歌手"
          })
          let playlists = data.playlistPage.content;
          playlists.forEach(function (item) {
            item['searchType'] = "歌单"
          })
          let songs = data.songPage.content;
          songs.forEach(function (item) {
            item['searchType'] = "单曲"
          })
          this.searchSuggests = []
          this.searchSuggests = this.searchSuggests.concat(songs)
          this.searchSuggests = this.searchSuggests.concat(playlists)
          this.searchSuggests = this.searchSuggests.concat(albums)
          this.searchSuggests = this.searchSuggests.concat(artists)

          console.log(this.searchSuggests)

          cb(this.searchSuggests);
        })

      },
      handleSelectForSearch(item) {
        console.log(item);
        this.searchQuery = item.name;
      },
      changeUrlToResizeImg(picUrl, size) {
        return picUrl.replace(/yunmusic_dev/, "resize_" + size + 'x' + size);
      },
      handleSelect(key, keyPath) {
        console.log(key);
        this.searchType = key;
        this.search(1);
      },

    },
    mounted () {
      this.search(1);
    }
  }
</script>

<style scoped>
  .g-bd, .g-bd1, .g-bd2, .g-bd3, .g-bd4, .g-bd5, .g-bd6, .g-bd7 {
    width: 980px;
    min-height: 700px;
    _height: 700px;
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid #d3d3d3;
    border-width: 0 1px;
  }

  .g-wrap {
    padding: 40px;
  }

  .f-pr {
    position: relative;
    zoom: 1;
  }

  div {
    display: block;
  }

  .u-title {
    height: 40px;
    border-bottom: 2px solid #c20c0c;
  }

  .f-cb {
  }

  .u-title h3 {
    float: left;
    font-size: 24px;
    font-weight: normal;
  }

  .f-ff2 {
    font-family: "Microsoft Yahei", Arial, Helvetica, sans-serif;
  }

  .u-title .menu {
    _position: absolute;
    font-size: 12px;
    font-weight: normal;
    margin: 2px 0 0 12px;
  }

  .u-btn2, .u-btn2:hover {
    text-decoration: none;
  }

  .u-btn2 {
    padding: 0 5px 0 0;
    white-space: nowrap;
  }

  .u-btn2, .u-btn2 i, .u-btn2 .icn, .u-btni, .u-btni i, .u-tag, .u-tag i, .u-btni-addply .ply {
    background: url(../image/button2.png) no-repeat 0 9999px;
  }

  .u-btn2-1 {
    color: #333;
    background-position: right -100px;
  }

  .u-title .menu i {
    color: #0c73c2 !important;
    padding: 0 10px 0 15px;
    _padding-right: 20px;
  }

  .u-btn2-1 i {
    color: #333;
    background-position: 0 -59px;
  }

  .u-btn2 i {
    padding: 0 15px 0 20px;
    pointer-events: none;
  }

  .u-btn2, .u-btn2 i {
    display: inline-block;
    height: 31px;
    line-height: 31px;
    overflow: hidden;
    vertical-align: top;
    text-align: center;
    cursor: pointer;
  }

  .u-icn, .u-icn2, .u-icn3 {
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
  }

  .u-icn, .u-title-1 .out .icon {
    background: url(../image/icon.png) no-repeat 0 9999px;
  }

  .u-title .menu .u-icn-38 {
    margin-left: 5px;
    _position: absolute;
    _top: 13px;
  }

  .u-icn-38 {
    width: 8px;
    height: 5px;
    background-position: -70px -543px;
  }

  .u-btn {
    display: inline-block;
  }

  /*.u-btn, div.u-page a, div.u-page a.js-selected, div.u-page a.znxt.js-disabled, div.u-page a.zprv.js-disabled {*/
  /*background: url(../image/button.png) no-repeat 0 9999px;*/
  /*}*/

  .f-fr {
    float: right;
  }

  .u-title .u-btn-hot .a1, .u-title .u-btn-time .a1, .u-title .u-btn-new .a2, .u-title .u-btn-area .a2, .u-title .u-btn-song .a1 {
    color: #fff;
  }

  .u-title .u-btn .a1, .u-title .u-btn .a2 {
    float: left;
    width: 46px;
    height: 29px;
    line-height: 29px;
    text-align: center;
  }

  .f-cb:after {
    clear: both;
    content: '.';
    display: block;
    height: 0;
    visibility: hidden;
  }

  .p-pl .m-cvrlst {
    margin: 30px 0 0 -50px;
  }

  .m-cvrlst li {
    float: left;
    display: inline-block;
    width: 140px;
    height: 188px;
    overflow: hidden;
    padding: 0 0 30px 50px;
    line-height: 1.4;
  }

  .u-cover-1 {
    width: 140px;
    height: 140px;
  }

  .u-cover {
    position: relative;
    display: block;
  }

  .u-cover img {
    display: block;
    width: 100%;
    height: 100%;
  }

  img, .txt {
    border: 0;
  }

  .u-cover-1 .msk {
    background-position: 0 0;
  }

  .u-cover .msk {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .u-cover .bottom, .u-cover .msk, .n-musicsd .lst .avatar .msk {
    background: url(../image/coverall.png) no-repeat;
  }

  .u-cover .bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 27px;
    background-position: 0 -537px;
    color: #ccc;
  }

  .u-cover .icon-play:hover {
    background-position: 0 -60px;
  }

  .u-cover .icon-play {
    position: absolute;
    right: 10px;
    bottom: 5px;
    width: 16px;
    height: 17px;
    background-position: 0 0;
  }

  .u-cover .icon-headset, .u-cover .icon-play {
    display: inline-block;
  }

  .u-cover .ply, .u-cover .icon-headset, .u-cover .icon-play, .u-face .msk, .n-note .head .msk, .icn-vip, .icn-daren, .u-checkbox {
    background: url(../image/iconall.png) no-repeat;
  }

  .u-cover .icon-headset {
    float: left;
    width: 14px;
    height: 11px;
    background-position: 0 -24px;
    margin: 9px 5px 9px 10px;
  }

  .u-cover .nb {
    float: left;
    margin: 7px 0 0 0;
  }

  .m-cvrlst li .dec {
    margin: 8px 0 3px;
    font-size: 14px;
  }

  .m-cvrlst li p {
    width: 100%;
  }

  .m-cvrlst li .tit {
    display: inline-block;
    max-width: 100%;
    _width: 100%;
    vertical-align: middle;
  }

  .s-fc0, a.s-fc0:hover {
    color: #000;
  }

  .f-thide {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: normal;
  }

  .s-fc4, a.s-fc4:hover {
    color: #999;
  }

  .m-cvrlst li .nm {
    display: inline-block;
    max-width: 85%;
    vertical-align: middle;
  }

  .m-cvrlst li .nm-icn {
    max-width: 76%;
  }

  .s-fc3, a.s-fc3:hover {
    color: #666;
  }

  .f-thide {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: normal;
  }

  .m-cvrlst li p .u-icn {
    margin-top: -1px;
    _margin-top: -3px;
  }

  .u-icn-84 {
    width: 12px;
    height: 13px;
    background-position: -65px -840px;
  }

  .u-icn, .u-icn2, .u-icn3 {
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
  }

  div.u-page {
    margin: 20px 0;
    text-align: center;
  }

  /*.u-btn, div.u-page a, div.u-page a.js-selected, div.u-page a.znxt.js-disabled, div.u-page a.zprv.js-disabled {*/
  /*background: url(../image/button.png) no-repeat 0 9999px;*/
  /*}*/

  div.u-page .zbtn {
    width: 69px;
    height: 24px;
    line-height: 24px;
    color: #333;
    text-align: left;
    padding: 0;
  }

  div.u-page .zbtn, div.u-page .zpgi {
    margin: 0 1px 0 2px;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 2px;
    vertical-align: middle;
  }

  .u-btn, div.u-page a, div.u-page a.js-selected, div.u-page a.znxt.js-disabled, div.u-page a.zprv.js-disabled {
    background: url(../image/button.png) no-repeat 0 9999px;
  }

  .u-btn-hot {
    width: 93px;
    height: 29px;
    background-position: 0 0;
  }

  .u-btn-time {
    width: 93px;
    height: 29px;
    background-position: 0 -32px;
  }

  div.u-page .zpgi {
    height: 22px;
    padding: 0 8px;
    background-color: #fff;
    line-height: 22px;
  }

  div.u-page .zpgi:hover {
    border-color: #666;
  }

  div.u-page a:hover {
    text-decoration: none;
  }

  div.u-page a.zprv.js-disabled, div.u-page a.zprv.js-disabled:hover {
    background-position: 0 -620px;
    color: #cacaca;
    cursor: default;
  }

  div.u-page a.js-selected, div.u-page a.js-selected:hover {
    background-position: 0 -650px;
    border-color: #A2161B;
    color: #fff;
    cursor: default;
  }

  div.u-page .zbtn, div.u-page .zpgi {
    margin: 0 1px 0 2px;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 2px;
    vertical-align: middle;
  }

  div.u-page .zbtn {
    width: 69px;
    height: 24px;
    line-height: 24px;
    color: #333;
    text-align: left;
    padding: 0;
  }

  div.u-page .zprv {
    width: 47px;
    padding-left: 22px;
    background-position: 0 -560px;
  }

  div.u-page .znxt {
    width: 57px;
    padding-left: 12px;
    background-position: -75px -560px;
  }

  .tag-cascader {
    width: 100px;
  }

  .tag-cascader-warp {
    /*margin-bottom: 20px;*/

  }

  .edit-playlist {
    margin-top: 30px;
    margin-right: 30px;
  }

  .avatar-uploader {
    width: 178px;
    height: 178px;
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .avatar-uploader:hover {
    border-color: #409EFF;
  }
  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    line-height: 178px;
    text-align: center;
  }
  .avatar {
    width: 178px;
    height: 178px;
    display: block;
  }

  .el-menu-demo {
    padding-left: 320px;
  }

  .search-demo {
    width: 300px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
  }

  .search-name {
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .search-type {
    font-size: 12px;
    color: #b4b4b4;
  }

  .u-icn, .u-title-1 .out .icon {
    background: url(../image/icon.png) no-repeat 0 9999px;
  }

  .g-bd, .g-bd1, .g-bd2, .g-bd3, .g-bd4, .g-bd5, .g-bd6, .g-bd7 {
    width: 980px;
    min-height: 700px;
    _height: 700px;
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid #d3d3d3;
    border-width: 0 1px;
  }

  .g-bd4 {
    background: url(../image/wrap4.png) repeat-y center 0;
  }

  .g-mn4 {
    float: left;
    width: 100%;
    /*margin-right: -270px;*/
  }

  .g-mn4c {
    /*margin-right: 271px;*/
  }

  .g-wrap6 {
    padding: 47px 30px 40px 39px;
  }

  .m-info .cover {
    float: left;
    position: relative;
    display: inline;
    margin: 0 -220px 0 0;
  }

  .u-cover-dj {
    width: 200px;
    height: 200px;
  }

  .u-cover {
    position: relative;
    display: block;
  }

  .u-cover img {
    display: block;
    width: 100%;
    height: 100%;
  }

  img, .txt {
    border: 0;
  }

  .u-cover .msk {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .u-cover .bottom, .u-cover .msk, .n-musicsd .lst .avatar .msk {
    background: url(../image/coverall.png) no-repeat;
    _background: url(../image/coverall.png) no-repeat 0 9999px;
  }

  .u-cover-dj .msk {
    width: 208px;
    height: 208px;
    background-position: 0 -1285px;
    top: -4px;
    left: -4px;
  }

  .m-info .cnt {
    float: right;
    width: 100%;
  }

  .m-info .cntc {
    margin-left: 230px;
  }

  .m-info .hd {
    position: relative;
    margin: 0 0 12px;
    line-height: 24px;
  }

  .f-fl {
    float: left;
  }

  em, i {
    font-style: normal;
    text-align: left;
    font-size: inherit;
  }

  .m-info .tit {
    margin-left: 64px;
    position: relative;
  }

  .m-info .hd h2 {
    line-height: 24px;
    font-size: 20px;
    font-weight: normal;
  }

  .f-brk {
    word-wrap: break-word;
    white-space: normal;
  }

  .f-ff2 {
    font-family: "Microsoft Yahei", Arial, Helvetica, sans-serif;
  }

  .f-cb:after {
    clear: both;
    content: '.';
    display: block;
    height: 0;
    visibility: hidden;
  }

  .m-info .user {
    margin: 0 0 20px;
    line-height: 35px;
  }

  .m-info .user .face {
    margin-right: 10px;
  }

  a, a *, .f-hand, .f-hand * {
    cursor: pointer;
  }

  a {
    text-decoration: none;
    color: #333;
  }

  .m-info .user .face, .m-info .user .face img {
    float: left;
    width: 35px;
    height: 35px;
  }

  .m-info .user .name {
    float: left;
  }

  .s-fc7, a.s-fc7:hover {
    color: #0c73c2;
  }

  a:hover {
    text-decoration: underline;
    color: #333;
  }

  .m-info .user .u-icn {
    float: left;
    margin: 9px 0 0 3px;
  }

  .u-icn-84 {
    width: 12px;
    height: 13px;
    background-position: -65px -840px;
  }

  .m-info .user .time {
    margin-left: 15px;
  }

  .s-fc4, a.s-fc4:hover {
    color: #999;
  }

  .m-info .btns {
    margin-bottom: 25px;
    margin-right: -10px;
  }

  .u-btni-addply {
    float: left;
  }

  .u-btn2-2 {
    color: #fff;
    background-position: right -428px !important;
  }

  .u-btn2, .u-btn2:hover {
    text-decoration: none;
  }

  .u-btn2 {
    padding: 0 5px 0 0;
    white-space: nowrap;
  }

  .u-btn2, .u-btn2 i, .u-btn2 .icn, .u-btni, .u-btni i, .u-tag, .u-tag i, .u-btni-addply .ply {
    background: url(../image/button2.png) no-repeat 0 9999px;
  }

  .u-btni-addply i {
    padding: 0 7px 0 8px;
  }

  .u-btn2-2 i {
    color: #fff;
    background-position: 0 -387px;
  }

  .u-btn2 i {
    padding: 0 15px 0 20px;
    pointer-events: none;
  }

  .u-btni-addply i {
    padding: 0 7px 0 8px;
  }

  .u-btn2, .u-btn2 i {
    display: inline-block;
    height: 31px;
    line-height: 31px;
    overflow: hidden;
    vertical-align: top;
    text-align: center;
    cursor: pointer;
  }

  .u-btni-addply .ply {
    float: left;
    width: 20px;
    height: 18px;
    margin: 6px 2px 2px 0;
    background-position: 0 -1622px;
    overflow: hidden;
  }

  .u-btni-add {
    width: 31px;
    margin-left: -3px;
    padding-right: 0 !important;
    background-position: 0 -1588px;
  }

  .u-btni-share, .u-btni-fav, .u-btni-cmmt, .u-btni-dl {
    background-position: right -1020px;
  }

  .u-btni {
    padding: 0 5px 0 0;
    white-space: nowrap;
  }

  .u-btni-fav i {
    background-position: 0 -977px;
  }

  .u-btni-share i, .u-btni-fav i, .u-btni-cmmt i, .u-btni-dl i, .u-btni-unfav i {
    padding-right: 2px !important;
    padding-left: 28px !important;
  }

  .u-btni i {
    padding: 0 7px 0 36px;
  }

  .u-btni, .u-btni i {
    float: left;
    height: 31px;
    line-height: 30px;
    min-width: 23px;
    cursor: pointer;
  }

  .m-info .btns2 .u-btni, .m-info .btns .u-btni {
    margin-right: 6px;
    font-family: simsun, \5b8b\4f53;
  }

  .m-info .btns .u-btni-add {
    margin-right: 5px !important;
  }

  .u-btni-share, .u-btni-fav, .u-btni-cmmt, .u-btni-dl {
    background-position: right -1020px;
  }

  .u-btni, .u-btni:hover {
    color: #333;
    text-decoration: none;
  }

  .u-btni-share i {
    background-position: 0 -1225px;
  }

  .u-btni-dl i {
    background-position: 0 -2761px;
  }

  .u-btni-cmmt i {
    background-position: 0 -1465px;
  }

  .m-info .tags {
    margin: 25px 0 5px;
    line-height: 22px;
  }

  .m-info .tags b {
    float: left;
  }

  .m-info b {
    font-weight: normal;
    color: #666;
  }

  .m-info .tags .u-tag {
    float: left;
    margin: 0px 10px 3px 0;
  }

  .u-tag {
    padding: 0 10px 0 0;
    text-shadow: 0 1px #fdfdfd;
    background-position: right -27px;
  }

  .u-tag, .u-tag:hover {
    color: #777;
    text-decoration: none;
  }

  .u-tag i {
    position: relative;
    zoom: 1;
    padding: 0 3px 0 13px;
    background-position: 0 0;
  }

  .u-tag, .u-tag i {
    float: left;
    height: 22px;
    line-height: 22px;
  }

  .m-info .intr {
    margin-top: 4px;
    line-height: 18px;
    color: #666;
  }

  .f-brk {
    word-wrap: break-word;
    white-space: normal;
  }

  .m-info .intr b {
    display: inline-block;
  }

  .m-info b {
    font-weight: normal;
    color: #666;
  }

  .f-hide, .js-hide {
    display: none !important;
  }

  .s-fc7, a.s-fc7:hover {
    color: #0c73c2;
  }

  .f-fr {
    float: right;
  }

  .u-icn-70 {
    background-position: -45px -520px;
  }

  .u-icn-69, .u-icn-70 {
    width: 11px;
    height: 8px;
    background-position: -65px -520px;
  }

  /*歌曲列表*/

  .n-songtb {
    margin-top: 27px;
  }

  .u-title {
    height: 40px;
    border-bottom: 2px solid #c20c0c;
  }

  .u-title-1 {
    height: 33px;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: 100%;
  }

  .u-title h3 {
    float: left;
    font-size: 24px;
    font-weight: normal;
  }

  .u-title-1 h3 {
    font-size: 20px;
    line-height: 28px;
  }

  .f-ff2 {
    font-family: "Microsoft Yahei", Arial, Helvetica, sans-serif;
  }

  .s-fc3, a.s-fc3:hover {
    color: #666;
  }

  .u-title .sub {
    float: left;
    margin: 13px 0 0 10px;
  }

  .u-title-1 .sub {
    margin: 9px 0 0 20px;
  }

  .u-title .more {
    float: right;
    margin-top: 14px;
  }

  .u-title-1 .more {
    margin-top: 5px;
  }

  .s-fc6, a.s-fc6:hover {
    color: #c20c0c;
  }

  strong, b {
    font-weight: bold;
  }

  .u-title-1 .out {
    margin-top: 5px;
    float: right;
  }

  .u-title .out-list {
    margin-right: 20px;
  }

  .u-title .out {
    margin-right: 20px;
  }

  .f-fl {
    float: left;
  }

  .u-icn-95 {
    width: 16px;
    height: 16px;
    background-position: -34px -863px;
  }

  table {
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
  }

  .m-table {
    width: 100%;
    border: 1px solid #d9d9d9;
  }

  thead {
    display: table-header-group;
    vertical-align: middle;
    border-color: inherit;
  }

  tr {
    display: table-row;
    vertical-align: inherit;
    border-color: inherit;
  }

  .m-table th, .m-table th .wp, .m-table td, .m-table .ply, .m-table .mv, .m-table .icn, .m-info .edit {
    background: url(../image/table.png) no-repeat 0 9999px;
  }

  .m-table th {
    vertical-align: top;
    text-align: left;
    font-weight: normal;
    color: #666;
  }

  .m-table th {
    height: 38px;
    background-color: #f7f7f7;
    background-position: 0 0;
    background-repeat: repeat-x;
  }

  .m-table .w1 {
    width: 74px;
  }

  .m-table th .wp {
    height: 18px;
    line-height: 18px;
    padding: 8px 10px;
    background-position: 0 -56px;
  }

  .m-table th.first .wp {
    background: none;
  }

  .m-table td {
    padding: 6px 10px;
    line-height: 18px;
    text-align: left;
  }

  .m-table .hd {
    height: 18px;
  }

  .m-table .ply {
    width: 17px;
    height: 17px;
    cursor: pointer;
    background-position: 0 -103px;
  }

  .m-table .ply {
    float: left;
  }

  .m-table .hd .ply {
    float: right;
  }

  .m-table .hd .num {
    width: 25px;
    margin-left: 5px;
    color: #999;
  }

  .m-table .tt {
    float: left;
    width: 100%;
  }

  .m-table .ttc {
    height: 18px;
    margin-right: 20px;
  }

  .m-table .txt {
    position: relative;
    display: inline-block;
    padding-right: 25px;
    margin-right: -25px;
    max-width: 99%;
    height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .m-table b {
    font-weight: normal;
  }

  .m-table tr:nth-child(odd) td {
    background-color: #f7f7f7;
  }

  user agent stylesheet
  :focus {
    outline: -webkit-focus-ring-color auto 5px;
  }

  .m-table .opt {
    float: left;
  }

  .m-table .hshow {
    display: none;
  }

  .u-icn-13 {
    width: 54px;
    height: 24px;
    background-position: 0 -243px;
  }

  .u-icn, .u-icn2, .u-icn3 {
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
  }

  .u-icn-81 {
    width: 13px;
    height: 13px;
    background-position: 0 -700px;
  }

  .m-table .u-icn-81 {
    float: left;
    margin-top: 2px;
  }

  .m-table .icn-fav {
    background-position: 0 -174px;
  }

  .m-table .mv, .m-table .icn {
    float: left;
    width: 18px;
    height: 16px;
    margin: 2px 0 0 4px;
    overflow: hidden;
    text-indent: -999px;
    cursor: pointer;
  }

  .m-table .icn-share {
    background-position: 0 -195px;
  }

  .m-table .icn-dl {
    background-position: -81px -174px;
  }

  .m-table .text a {
    white-space: nowrap;
  }

  .m-table .mv, .m-table .icnfix {
    position: absolute;
    top: 0;
    right: 0;
  }

  .m-table .mv {
    width: 23px;
    height: 17px;
    margin: 1px 0 0 0;
    background-position: 0 -151px;
  }

  .m-table .text {
    width: 100%;
    position: relative;
    zoom: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .dialog-item {
    /*line-height: 18px;*/
    padding-bottom: 10px;
    display: flex;
    /*justify-content:center;*/
    align-items:Center;
    border-bottom: 1px solid lightgrey;
    cursor:pointer;
  }

  .song-result {
    width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
</style>
